package com.partners.dao.basic;

import com.partners.dao.bo.CustomerDO;
import com.partners.dao.dto.CustomerOutputDTO;
import org.apache.ibatis.annotations.Param;

import java.math.BigInteger;
import java.util.List;
import java.util.Map;

public interface CustomerDao {
    int deleteByPrimaryKey(Integer id);

    int insert(CustomerDO record);

    int insertSelective(CustomerDO record);

    CustomerDO selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CustomerDO record);

    int updateByPrimaryKey(CustomerDO record);


    List<Map<String,Object>> getCustomerListSelective(@Param("name") String name,
                                                      @Param("phone") BigInteger phone,
                                                      @Param("uid") Integer uid);

    CustomerOutputDTO getCustomerDetailById(Integer id);

    Integer getUserCustomerByPhone(@Param("phone") Long phone,
                                   @Param("uid") Integer uid);

    Long getCustomerLastCode(Integer uid);

    Map<String,Object> getCustomerQrCode(Integer id);

    List<Map<String,Object>> selectAllCustomerList();

    Integer getCustomerDetailByOpenId(String openId);

    List<CustomerOutputDTO> selectCustomerList(@Param("nowtime") Integer nowtime,
                                               @Param("name") String name,
                                               @Param("phone") BigInteger phone);

    Map<String,Object> getCustomerCouponDetail(Integer id);


    List<CustomerOutputDTO> getOrderCustomerList();

    CustomerDO selectDealByPrimaryKey(Integer customerId);
}
